package com.steven.design.JieGou_Pattern.decorate.touming;

/**
 * 透明装饰模式支持套娃模式
 */
public class TouMingTest {
    public static void main(String[] args) {
        IComputer computer =new ZuZhuangJI();
        System.out.println("原生组装机："+computer.getPrice());
        IComputer addMemory = new AddMemory(computer);
        System.out.println("加了内存的组装机："+addMemory.getPrice());
        AddDisk addDisk = new AddDisk(addMemory);
        System.out.println("加硬盘内存的组装机："+addDisk.getPrice());
    }
}
